Skip to content

feat(sessions): keyboard navigation and jump-to-message picker#3407

Merged
charlesvien merged 1 commit into
mainfrom
feat/chat-message-navigation
Jul 14, 2026
Merged

feat(sessions): keyboard navigation and jump-to-message picker#3407
charlesvien merged 1 commit into
mainfrom
feat/chat-message-navigation

Conversation

@charlesvien

@charlesvien charlesvien commented Jul 13, 2026

Copy link
Copy Markdown
Member

Problem

Long conversations are hard to navigate: search finds text but cannot move between turns or jump to a specific message.

Closes #2360

Changes

Recreates #2361 by @Basit-Balogun10 (GitHub cannot reopen a PR after its head branch was force-pushed), squashed into one commit and rebased onto current main. The configurable-keybindings work from #2321 is not included; the new shortcuts are fixed bindings.

  • Alt/Option+Up/Down moves between user messages, with a focus ring on the selected message. Works in both the new ChatThread and the legacy ConversationView.
  • Cmd/Ctrl+J opens a jump-to-message picker with date presets and a custom range filter, also in both views.
  • The new shortcuts are listed in the shortcuts sheet.

Also addresses the review-bot findings: the shortcuts fire from the composer but not from other editable surfaces (CodeMirror, terminal, plain inputs), the picker resets its filters by remounting instead of an effect, a custom end date with no time now covers the whole day and the date inputs have accessible labels.

Demo videos in #2361.

How did you test this?

Ran pnpm --filter @posthog/ui test (1505 tests, all passing), pnpm --filter @posthog/ui typecheck and Biome on the touched files. Manually exercised the shortcuts in the running desktop app.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

@trunk-io

trunk-io Bot commented Jul 13, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

React Doctor found 1 issue in 1 file · 1 warning.

1 warning

src/features/sessions/components/chat-thread/MessageJumpPicker.tsx

Reviewed by React Doctor for commit 3705f9b.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (3)

  1. packages/ui/src/features/sessions/components/chat-thread/MessageJumpPicker.tsx, line 2543 (link)

    P1 End Date Drops Messages

    When a user sets a custom range ending on a day, datetime-local can produce midnight at the start of that end day. The <= new Date(customTo).getTime() check then excludes messages later on that same day, so a same-day range can appear empty even though matching messages exist.

  2. packages/ui/src/features/sessions/components/chat-thread/ChatThread.tsx, line 2098-2102 (link)

    P1 Jump Shortcut Steals Editors

    This handler fires on form fields and contenteditable targets while the thread is mounted. Pressing Cmd/Ctrl+J inside the message editor or another focused editor opens the jump picker and prevents the editor from handling its own shortcut.

  3. packages/ui/src/features/sessions/components/chat-thread/ChatThread.tsx, line 2136-2146 (link)

    P1 Message Navigation Steals Inputs

    These Alt/Option+Up/Down handlers also run from form fields and contenteditable targets. When a user is composing a message or editing text, the shortcut is prevented and the thread navigates between messages instead of letting the focused editor handle the key press.

Reviews (1): Last reviewed commit: "add configurable shortcuts and message n..." | Re-trigger Greptile

@charlesvien charlesvien force-pushed the feat/chat-message-navigation branch from 61e2734 to 5c54ff9 Compare July 13, 2026 23:02
@charlesvien charlesvien force-pushed the feat/chat-message-navigation branch from 5c54ff9 to 7904dd5 Compare July 13, 2026 23:19
@charlesvien charlesvien added the Stamphog This will request an autostamp by stamphog on small changes label Jul 13, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a 711-line feature addition with zero reviews, from an author without a CODEOWNERS match, adding new keyboard shortcuts and interaction logic to the core chat thread. Zero reviews on a complex behavioral change warrants human sign-off before auto-approval.

@stamphog stamphog Bot removed the Stamphog This will request an autostamp by stamphog on small changes label Jul 13, 2026
@charlesvien charlesvien force-pushed the feat/chat-message-navigation branch from 7904dd5 to 3705f9b Compare July 13, 2026 23:29
@DanielVisca DanielVisca self-requested a review July 14, 2026 01:45
@charlesvien charlesvien merged commit d942c02 into main Jul 14, 2026
26 checks passed
@charlesvien charlesvien deleted the feat/chat-message-navigation branch July 14, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add keyboard navigation and jump-to-message modal for long conversations

3 participants